

ProjectName.modules.BlogListing = {
    init: function() {
        this.selectAllCheckbox();
        this.initCkEditor();
        this.multiimage();
    }, 
    multiimage : function () {
        //Drag n Drop up-loader for DOCUMENT
        Dropzone.autoDiscover = false;
        var paramsdata = {};
        paramsdata['UNIQUEIDENTIFIER'] = UNIQUEIDENTIFIER;
        //alert(UNIQUEIDENTIFIER);
        $(".image_dropzone").dropzone(
                {
                    url: BASE_PATH + '/admin/blog/upload',
                    paramName: 'Blog',
                    params: paramsdata,
                    maxFilesize: 500,
                    acceptedFiles: ".jpeg,.jpg,.png,.gif,.JPEG,.JPG,.PNG,.GIF",
                }
        );
    
    },
   initCkEditor : function () {
        var config = {
	height: 350,
	width: 600,
	toolbar :
	        [
		        ['Bold', 'Italic', '-', 'NumberedList', 'BulletedList', '-', 'Link', 'Unlink','Source', ],
		        ['JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock'],
		        ['Styles','Format','Font','FontSize'],
		        ['Image','Table','HorizontalRule','SpecialChar','PageBreak'],
		        ['TextColor','BGColor']
	        ]
	};
				
            $('#blog_description').ckeditor(config);
            
    },
	
	
    
    selectAllCheckbox: function() {
        $('#selectall').click(function() {
            if ($(this).is(':checked') === true) {
                $('.content-checkbox').attr('checked', true);
            } else {
                $('.content-checkbox').attr('checked', false);
            }
        });
    }
};